package com.example.stringbufferlogger.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.stringbufferlogger.dto.ConfigApiIDPolicyDTO;
import com.example.stringbufferlogger.dto.ConfigParallellTableEntityDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface ZYXLifeCommonMapper<T> extends BaseMapper<T> {

    List<ConfigApiIDPolicyDTO> selectConfigApiIdPolicyById();

    List<ConfigParallellTableEntityDTO> selectConfigParallellTable();

    List<String> selectDataByPolicyNo(String sql);

    String selectBranchIdByPolicyNo(String policyNo);

    String selectBranchIdByGPolicyNo(String policyNo);

    @Select("select POLICYNO from grplist where GPOLICYNO=#{gpolicyno} and BRANCHID ={branchid}")
    List<String> getPolicyNosByGPolicyNo(@Param("gpolicyno") String gpolicyno, @Param("branchid") String branchid);
}
